import java.util.Iterator;

/**
 * Created by asus on 2017/10/22.
 */
public interface BinaryTree<T> extends Iterable<T> {
    public T getRootElement();

    public BinaryTree<T> getLeft();

    public BinaryTree<T> getRight();

    public boolean contains(T target);

    public T find (T target);

    public boolean isEmpty();

    public int size();

    public String toString();

    public Iterator<T> preorder();

    public Iterator<T> inorder();

    public Iterator<T> postorder();

    public Iterator<T> levelorder();
}
